<template>
	<view>
		<view class="uni-margin-wrap" >
			<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
				:duration="duration"				
				>
				<swiper-item v-for="(item,index) in list"
				:key="index">
					<view class="swiper-item">
						<image :src="item.img" mode=""></image>
					</view>
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				background: ['color1', 'color2', 'color3'],
				indicatorDots: true,
				autoplay: true,
				interval: 3000,
				duration: 500,
				list: [{
						id: 1,
						img: "/static/img/swiper1.jpg",
					},
					{
						id: 2,
						img: "/static/img/swiper2.jpg",
					},
					{
						id: 3,
						img: "/static/img/swiper3.jpg",

					},
					{
						id: 4,
						img: "/static/img/swiper4.jpg",

					}
				]
			}
		},
		methods: {
			changeIndicatorDots(e) {
				this.indicatorDots = !this.indicatorDots
			},
			changeAutoplay(e) {
				this.autoplay = !this.autoplay
			},
			intervalChange(e) {
				this.interval = e.target.value
			},
			durationChange(e) {
				this.duration = e.target.value
			}
		}
	}
</script>

<style scoped lang="scss">
	.uni-margin-wrap {
		width: 690rpx;
		width: 100%;
	}

	.swiper {
		width: 100%;
		height: 420rpx;
		padding:0 5%;
	}

	.swiper-item {
		width: 100%;
		display: block;
		height: 400rpx;
		line-height: 300rpx;
		text-align: center;
	}

	.swiper-list {
		margin-top: 40rpx;
		margin-bottom: 0;
	}

	.uni-common-mt {
		margin-top: 60rpx;
		position: relative;
	}

	.info {
		position: absolute;
		right: 20rpx;
	}

	.uni-padding-wrap {
		width: 550rpx;
		padding: 0 100rpx;
	}
	
	image{
		width: 100%;
		height: 100%;
	}
</style>
